package com.juyu.miliao.authentication.dao.mysql;

import com.juyu.miliao.authentication.domain.RegisterAddress;
import com.juyu.miliao.common.dataSource.tool.operate.Operate;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author jh
 * 2018/9/19
 */
@Repository
public class RegisterAddressDao {

    @Resource
    private SqlSession sqlSession;

    @Operate("strategy('byUserId', #userId)")
    public int saveRegisterAddress(RegisterAddress registerAddress, Long userId) {
        return sqlSession.insert("saveRegisterAddress", registerAddress);
    }

}
